package cn.tedu.egweibo7.base.config;

import cn.tedu.egweibo7.base.interceptors.LoginNotInterceptors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Slf4j
@RestControllerAdvice
public class InterceptorsConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new LoginNotInterceptors())
                .addPathPatterns("/v1/weibo/insert","/v1/comment/insert");

    }
}
